import requests

def login():
    headers = {
        'accept': 'application/json, text/plain, */*',
        'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
        'content-type': 'application/json',
        'origin': 'https://admimplat.merchant.java.crmeb.net',
        'priority': 'u=1, i',
        'referer': 'https://admimplat.merchant.java.crmeb.net/',
        'sec-ch-ua': '"Microsoft Edge";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',
        'sec-ch-ua-mobile': '?0',
        'sec-ch-ua-platform': '"Windows"',
        'sec-fetch-dest': 'empty',
        'sec-fetch-mode': 'cors',
        'sec-fetch-site': 'same-site',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0',
    }

    json_data = {
        'account': 'demo',
        'pwd': 'crmeb.com',
        'captchaVO': {},
    }

    response = requests.post('https://api.admin.merchant.java.crmeb.net/api/admin/platform/login', headers=headers,
                             json=json_data)
    return response.json()

def search():
    headers = {
        'accept': 'application/json, text/plain, */*',
        'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
        'authori-zation': 'platforme928bb205342464890837876f056ca41',
        'origin': 'https://admimplat.merchant.java.crmeb.net',
        'priority': 'u=1, i',
        'referer': 'https://admimplat.merchant.java.crmeb.net/',
        'sec-ch-ua': '"Microsoft Edge";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',
        'sec-ch-ua-mobile': '?0',
        'sec-ch-ua-platform': '"Windows"',
        'sec-fetch-dest': 'empty',
        'sec-fetch-mode': 'cors',
        'sec-fetch-site': 'same-site',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0',
    }

    params = {
        'payCount': '',
        'sex': '',
        'identity': '',
        'registerType': '',
        'page': '1',
        'limit': '20',
        'searchType': 'all',
        'content': '',
        'tagIds': '',
        'temp': '1761276651',
    }

    response = requests.get(
        'https://api.admin.merchant.java.crmeb.net/api/admin/platform/user/list',
        params=params,
        headers=headers,
    )
    return response.json()

def add():
    pass
def delete():
    pass
print(login())
print(search())
print(add())
print(delete())